package net.sx.minemodule.mvp.presenters;

import com.alibaba.fastjson.JSON;
import com.kedll.library.mvp.AbstractRefreshPresenter;
import com.kedll.library.mvp.RefreshingView;

import net.sx.minemodule.MineApiUtils;
import net.sx.minemodule.mvp.bean.AfterBean;

import java.util.List;

/**
 * 售后列表
 *
 * @author 11470
 */
public class MineAfterListPresenter extends AbstractRefreshPresenter<RefreshingView> {

    public MineAfterListPresenter(RefreshingView mView) {
        super(mView);
    }

    @Override
    protected void fetchData(boolean isLoadMore) {
        MineApiUtils.getRefundList(subModelList -> {
            List<AfterBean> afterBeans = JSON.parseArray(subModelList.getItems(), AfterBean.class);
            parserData(isLoadMore, afterBeans);
        }, throwable -> {
        });
    }
}
